# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdenetwork-filesharing
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://www.kde.org/applications/internet/"
pkgdesc="Properties dialog plugin to share a directory with the local network"
license="GPL-2.0-only OR GPL-3.0-only"
depends="samba"
makedepends="extra-cmake-modules qt5-qtbase-dev kcompletion-dev kcoreaddons-dev ki18n-dev kio-dev kwidgetsaddons-dev kdoctools-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdenetwork-filesharing-$pkgver.tar.xz"
subpackages="$pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DSAMBA_INSTALL=OFF
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="e7068024ebadfdd279775932e014f8cd7016d05f3082d5b847975d6cb469cda1f19f74989686e75cfb939d580065f70f9202bd90566331e6f7a0bf2febce9f63  kdenetwork-filesharing-20.04.3.tar.xz"
